package com.qidian.blog.servlet;

import com.qidian.blog.factory.ServiceFactory;
import com.qidian.blog.service.IndexService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @Author 郭浩
 * @Date 2022/10/13 10:22
 */
@WebServlet("/index")
public class IndexServlet extends BaseServlet{
    private IndexService indexService = ServiceFactory.getService(IndexService.class);
    public void load(HttpServletRequest req, HttpServletResponse resp)throws IOException, ServletException{
        respJson(indexService.load(),resp);
    }
}
